<template>
  <div class="question-container">
    <el-card>
      <search @search="search" />
      <list ref="list" />
    </el-card>
    <!-- 预览弹窗 -->
  </div>
</template>

<script>
import search from "../components/question-search.vue";
import list from "../components/question-list.vue";
export default {
  name: "subject",
  data() {
    return {};
  },
  components: {
    search,
    list,
  },
  methods: {
    search(e) {
      // console.log(e);
      if (!e) {
        this.$refs.list.list();
      } else {
        this.$refs.list.getSearchList(e);
      }
    },
  },
};
</script>

<style scoped lang="scss"></style>
